package com.hxht.cmp.controller;


import com.hxht.cmp.common.result.ResultResponse;
import com.hxht.cmp.service.CourtRoomService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/courtRoom")
public class CourtRoomController {
    private final Logger logger = LoggerFactory.getLogger(CourtRoomController.class);

    @Autowired
    private CourtRoomService courtRoomService;

    @RequestMapping("getCfgInfo")
    public ResultResponse getCfgInfo(String courtRoomUid, String serverIp) {
        if(StringUtils.isBlank(courtRoomUid)){

        }
        Map<String,String> result = courtRoomService.getCfg(courtRoomUid,serverIp);
        logger.info("根据courtRoomUid查询CFG信息：" + result);
        return ResultResponse.success(result);
    }


}
